<template>
  <div class="notfound-container">
    <div class="notfound-content card-shadow">
      <div class="notfound-image">
        <img src="https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/thumb/area-stack.webp" alt="404图片" />
      </div>
      <h1 class="notfound-title">404</h1>
      <div class="notfound-subtitle">页面不存在</div>
      <p class="notfound-desc">抱歉，您访问的页面已被移除或不存在</p>
      <div class="notfound-actions">
        <el-button type="primary" class="home-btn" @click="goHome">
          <el-icon><Back /></el-icon>
          返回首页
        </el-button>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { Back } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/')
}
</script>

<style scoped lang="scss">
.notfound-container {
  max-width: 1200px;
  min-width: $min-width;
  margin: 0 auto;
  padding: $spacing-huge;
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  
  @media (max-width: 768px) {
    padding: $spacing-base;
  }
}

.notfound-content {
  background: white;
  border-radius: $border-radius-large;
  padding: $spacing-huge;
  width: 100%;
  max-width: 600px;
  text-align: center;
  box-shadow: $card-shadow;
  transition: $transition-base;
  
  &:hover {
    box-shadow: $hover-shadow;
    transform: translateY(-2px);
  }
  
  @media (max-width: 768px) {
    padding: $spacing-large;
  }
}

.notfound-image {
  margin-bottom: $spacing-large;
  
  img {
    width: 200px;
    height: auto;
    border-radius: $border-radius-large;
    opacity: 0.8;
    
    @media (max-width: 576px) {
      width: 150px;
    }
  }
}

.notfound-title {
  font-size: 72px;
  font-weight: 700;
  margin: 0;
  background: $primary-gradient;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  
  @media (max-width: 768px) {
    font-size: 60px;
  }
  
  @media (max-width: 576px) {
    font-size: 48px;
  }
}

.notfound-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: $text-primary;
  margin-bottom: $spacing-base;
  
  @media (max-width: 768px) {
    font-size: 20px;
  }
  
  @media (max-width: 576px) {
    font-size: 18px;
  }
}

.notfound-desc {
  color: $text-regular;
  font-size: 16px;
  margin-bottom: $spacing-huge;
  
  @media (max-width: 768px) {
    font-size: 14px;
    margin-bottom: $spacing-large;
  }
}

.notfound-actions {
  .home-btn {
    background: $primary-gradient;
    border: none;
    padding: $spacing-small $spacing-huge;
    font-size: 16px;
    
    .el-icon {
      margin-right: $spacing-small;
    }
    
    &:hover {
      opacity: 0.9;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
    }
    
    @media (max-width: 768px) {
      padding: $spacing-small $spacing-large;
      font-size: 14px;
    }
  }
}
</style> 